package com.edward.model;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


@Entity
public class BVList {

	private int id;
	
	private String company;
	
	private String address;
	
	private String invoiceNum;
	
	private Date date;
	
	private String orderNum;
	
	private String destination;
	
	private double fobChina;
	
	private int oceanFreight;
	
	private String sud;
	
	private double total;
	
	private String state;
	
	private String number;
	
	private List <BVItem>items;

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getInvoiceNum() {
		return invoiceNum;
	}

	public void setInvoiceNum(String invoiceNum) {
		this.invoiceNum = invoiceNum;
	}

	@Temporal(TemporalType.DATE)
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(String orderNum) {
		this.orderNum = orderNum;
	}

	public String getDestination() {
		return destination;
	}

	public void setDestination(String destination) {
		this.destination = destination;
	}

	public double getFobChina() {
		return fobChina;
	}

	public void setFobChina(double fobChina) {
		this.fobChina = fobChina;
	}

	public int getOceanFreight() {
		return oceanFreight;
	}

	public void setOceanFreight(int oceanFreight) {
		this.oceanFreight = oceanFreight;
	}

	public String getSud() {
		return sud;
	}

	public void setSud(String sud) {
		this.sud = sud;
	}

	public double getTotal() {
		return total;
	}

	public void setTotal(double total) {
		this.total = total;
	}

	@OneToMany(fetch = FetchType.EAGER)
	@JoinColumn(name="BV_ID")
	public List<BVItem> getItems() {
		return items;
	}

	public void setItems(List<BVItem> items) {
		this.items = items;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	

	

	
	
	
	
	
	
}
